package cn.edu.scau.cmi.linjinyong.factory;

import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.Label;

public class Controller {
    @FXML
    private Label resultLabel;

    @FXML
    private Button chickenButton;
    @FXML
    private Button porkButton;
    @FXML
    private Button beefButton;

    BeefFactory beefFactory = new BeefFactory();
    PorkFactory porkFactory = new PorkFactory();
    ChickenFactory chickenFactory = new ChickenFactory();

    @FXML
    private void chooseChicken() {
        resultLabel.setText("选择结果：" + chickenFactory.getMeat().cook());
    }

    @FXML
    private void choosePork() {
        resultLabel.setText("选择结果：" + porkFactory.getMeat().cook());
    }

    @FXML
    private void chooseBeef() {
        resultLabel.setText("选择结果："+ beefFactory.getMeat().cook());
    }
}
